package com.springcloud.user.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/get/{id}")
    public Map getUser(@PathVariable("id") String id) throws InterruptedException {
        Thread.sleep(1000);
        Map<String,String> map = new HashMap();
        map.put("id",id);
        map.put("name","张三");
        return map;
    }

}
